package retrofit.boot.annotation;

import org.apache.commons.codec.digest.HmacUtils;
import retrofit.Endpoint;

/**
 * Created by wulg on 2019/11/12
 * description:抽象的别名助手
 */
public final class AliasHelper {

    public static String getClientAlias(String name, String interfaceClassName){
        return "RetrofitClient_" + HmacUtils.hmacMd5Hex(name,interfaceClassName);
    }

    public static String getEndpointAlias(String name){
        return "RetrofitEndpoint_" + HmacUtils.hmacMd5Hex(name, Endpoint.class.getName());
    }
}
